﻿using Approve.Web.Helper;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace Approve.Web.Models.Shared
{
    /// <summary>
    /// 项目账号登陆信息
    /// </summary>
    public class ApproveAccount
    {
        /// <summary>
        /// 用户ID
        /// </summary>
        public string UserCode { get; set; }
        /// <summary>
        /// 用户名
        /// </summary>
        public string UserName { get; set; }
        /// <summary>
        /// 登陆时间
        /// </summary>
        public DateTime LoginDate { get; set; }

        /// <summary>
        /// 获取登陆用户信息
        /// </summary>
        /// <returns></returns>
        public static ApproveAccount Get(System.Web.Http.Controllers.HttpControllerContext context)
        {
            return context.RouteData.Values[ApproveSettings.RouteDataAccountKey] as ApproveAccount;
        }
    }
}